
package Migue;
//conversiones string->double->byte->float->integer->short->long->boolean.
public class conversiones {
     public static void main(String[] args) {
        String str= "555";
        int in =Integer.parseInt(str);
        System.out.print("int: "+str+"->");

        Double dou = new Double(in);
        System.out.print("Double: "+dou+"->" );

        Byte byt=dou.byteValue();
        System.out.print("Byte: "+byt+"->");

        Float flo = byt.floatValue();
        System.out.print("Float: "+flo+"->");

        Integer in2=flo.intValue();
        System.out.print("Integer: "+in2+"->");

        Short sho=in2.shortValue();
        System.out.print("Short: "+sho+"->");

        Long lon=sho.longValue();
        System.out.print("Long: "+lon+"->");
        boolean bol=Boolean.parseBoolean(lon.toString());
        System.out.println("Boolean: "+bol+".");
    }
}

